package chpt03.shopping;

public class Main {
	public static void main(String[] args) {
		Commodity c1 = new Commodity("苹果", 10.5);
		Commodity c2 = new Commodity("苹果", 10.5);
		Commodity c3 = new Commodity("手机", 25.99);
		Commodity c4 = new Commodity("Java教程", 8.88);
		Commodity c5 = new Commodity("苹果", 10.5);
		Commodity c6 = new Commodity("手机", 25.99);
		ShoppingCart cart = new ShoppingCart(10);
		cart.add(c1);cart.add(c2);cart.add(c3);
		cart.add(c4);cart.add(c5);cart.add(c6);
		cart.delete(new Commodity("苹果"));
		double x = cart.checkout();
		cart.show();
		System.out.print("商品数量："+cart.getQty());
		System.out.println(" ,商品总价："+x);
	}
}
